<template>
	<view class="crad-list">
		<view class="list">
			<view class="item w-center" v-for="(item,index) in list" :key="index">
				<view class="i-l df df-justify-content-between df-align-items">
					<text>行驶证</text>
					<!-- <text>2020-12-13</text> -->
				</view>
				<view class="r-time df df-justify-content-between df-align-items">
					<view>
						车牌号：
						<text>{{item.car_no}}</text>
					</view>
					<view>
						车辆类型：
						<text>{{item.car_type}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="emty" v-if="list.length == 0">
			<text>暂无证件</text>
		</view>
	</view>
</template>

<script>
	import api from '@/api/mine.js'
	export default{
		data(){
			return{
				list: []
			}
		},
		onLoad() {
			this.getList()
		},
		methods:{
			getList(){
				api.getDriverList().then(res=>{
					if(res.code == 1){
						this.list = res.data;
					}
				})
			}
		}
	}
</script>

<style>
	page{
		background: #F5F5F5;
	}
</style>
<style lang="scss" scoped>
	.list{
		.item{
			background: #FFF;
			margin-top: 40rpx;
			border-radius: 15rpx;
			padding: 40rpx 30rpx;
			box-sizing: border-box;
			color: #555;
			font-family: "楷体";
			box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.9) 0px 0px 0px 1px;
			// box-shadow: rgba(136, 165, 191, 0.48) 6px 2px 16px 0px, rgba(255, 255, 255, 0.8) -6px -2px 16px 0px;
			
			.i-l{
				font-size: 30rpx;
				margin-bottom: 40rpx;
				
				text:nth-child(1){
					font-size: 40rpx;
					color: #000;
					font-weight: bold;
				}
			}
			
			.r-time{
				font-size: 28rpx;
				
				view:nth-child(1){
					flex-shrink: 0;
					margin-right: 10rpx;
				}
				
				text{
					font-weight: bold;
					color: #222;
				}
				
				
			}
		}
		
		
	}
	
	.emty{
		position: relative;
		width: 100vw;
		height: 100vh;
		text{
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%,-50%);
			font-size: 28rpx;
			color: #A0A0A0;
		}
	}
</style>
